#include <stdio.h> 
int main()
{
	long long n = 0;
	long long step = 1;
	scanf("%lld", &n);
	while ( n != 1 ) {
		if ( n % 2 == 0 ) {
			n = n / 2;
		}
		else {
			n = 3 *n  + 1;
		}
		step ++;
	}
	printf("%lld", step);
	return 0;
}
